Session Property 

The Session property returns the top-level Session object2KVAZVM associated with the specified OLE Messaging Library object. Read-only.

Syntax

Set objSession = object.Session

Data Type

Object

Remarks

The Session object represents the highest level in the OLE Messaging Library object hierarchy. Its Session property is set to Nothing.

Example

' Function: Folder_Session

' Purpose: Access the Folder's Session property and display its name

' See documentation topic: Session property

Function Folder_Session()

Dim objSession2 As Object   ' session object to get the property

    ' error handling here...

    If objFolder Is Nothing Then

        MsgBox "No active folder; please select Session->Inbox"

        Exit Function

    End If

    Set objSession2 = objFolder.Session

    If objSession2 Is Nothing Then

        MsgBox "Unable to access Session property"

        Exit Function

    End If

    MsgBox "Folder's Session property name = " & objSession2.Name

    Set objSession2 = Nothing

    ' error handling here...

End Function